#pragma once

class Composite;

struct SymbolicDescription;

template<typename> class QStack;

namespace Commands
{
    class AbstractAnimation;
    class AbstractPicture;

    class SmartPicture;
    class SmartAnimation;
    class SmartAudio;
    class SmartPicText;

    class SmartQtPicture;
    class SmartQtAnimation;
    class SmartQtPicture;
    class SmartQtAudio;

    class Wait;
    class WaitTillCommandsEnded;
    class Clear;
    class GoToCommand;
    class Mark;
    class GoToMark;
    class LoopToMark;
    class SetData;
    class Add;
    class ChangeValue;
    class Delta;
    class Sine;
    class GetData;
    class Hide;
    class ShowEndless;
    class SetAngle;
    class SetAlpha;
    class SetXCoord;
    class SetYCoord;
    class SetXYCoords;
    class SetScale;
    class SetCurrentFrame;
    class StartAnimate;
    class Play;
    class Stop;
    class PlayContinous;
    class FadeOut;
    class SetValue;

    namespace Core
    {
        class Value;

        class Dispatcher;
        class Queue;


        class Inspector
        {
        public:

            Inspector(Composite* const currentParent, SymbolicDescription* const symbolicDescription, bool editable = false);

            ~Inspector();

            void Inspect(SmartPicture* picture);
            void Inspect(SmartAnimation* animation);

            void Inspect(SmartQtPicture* picture);
            void Inspect(SmartQtAnimation* animation);
            void Inspect(SmartQtAudio* audio);


            void Inspect(const Dispatcher& dispatcher);
            void Inspect(const AbstractPicture& picture);
            void Inspect(const AbstractAnimation& animation);

            void Inspect(const Queue& queue);

            void Inspect(const Value& value);
            void Inspect(const Wait& wait);
            void Inspect(const Clear& clear);
            void Inspect(const GoToCommand& gotocommand);
            void Inspect(const Mark& mark);
            void Inspect(const GoToMark& gotomark);
            void Inspect(const LoopToMark& looptomark);
            void Inspect(const SetData& dataset);
            void Inspect(const Add& add);
            void Inspect(const ChangeValue& valuechange);
            void Inspect(const Delta& delta);
            void Inspect(const Sine& sine);
            void Inspect(const GetData& dataget);
            void Inspect(const Hide& hide);
            void Inspect(const ShowEndless& showendless);
            void Inspect(const SetAngle& angleset);
            void Inspect(const SetAlpha& alphaset);
            void Inspect(const SetXCoord& coordxset);
            void Inspect(const SetYCoord& coordyset);
            void Inspect(const SetXYCoords& coordxyset);
            void Inspect(const SetScale& scaleset);
            void Inspect(const SetCurrentFrame& setcurrentframe);
            void Inspect(const StartAnimate& animationstart);
            void Inspect(const Play& play);
            void Inspect(const Stop& stop);
            void Inspect(const PlayContinous&);
            void Inspect(const FadeOut&);
            void Inspect(const SetValue&);
            void Inspect(const WaitTillCommandsEnded&);
        private:
            Inspector();

            Composite* currentParent;
            SymbolicDescription* const symbolicDescription;
            QStack<Composite*>* const stack;

            const bool editable;

            void PushParent(Composite* currentParent);

            void PopParent();
        };
    }//namespace
}//namespace
